package cn.iune.platform.dictionary;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import com.justep.baas.data.RowState;

@Entity
@Table(name="RegionInfo",uniqueConstraints={
		@UniqueConstraint(columnNames={"regionCode", "fParent"})
		,@UniqueConstraint(columnNames={"regionName", "fParent"})
		})
@NamedQuery(name="RegionInfo.findAll", query="SELECT s FROM RegionInfo s")
public class RegionInfo {

	@Id
	@Column(length=32)
	private String fID;
	
	@Column(length=10)
	private String regionCode;
	@Column(length=50)
	private String regionName;
	
	@Column(length=256)
	private String regionFullID;
	@Column(length=128)
	private String regionFullCode;
	@Column(length=256)
	private String regionFullName;

	@Column(length=10)
	private String nodeType;//节点类型
	@Column(length=4)
	private String areaCode;//区号
	@Column(length=6)
	private String postCode;//邮政编码

	private int nodeLevel = 0;
	@Column(length=32)
	private String nodeKind;
	@Column(length=50)
	private String sortNo;
	@Column(length=32)
	private String fParent;
	
	@Column(length=15)
	private String cUsercode;
	@Column(length=20)
	private String cUsername;//制单人
	private Timestamp cDatetime;
	
	@Column(length=32)
	private String userId;

	@Version
	private int version = 0;
	
	@Transient//非持久字段
	private RowState rowState;
	public RowState getRowState() {
		return rowState;
	}
	public void setRowState(RowState rowState) {
		this.rowState = rowState;
	}


	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}
	public String getfID() {
		return fID;
	}
	public void setfID(String fID) {
		this.fID = fID;
	}
	public String getRegionCode() {
		return regionCode;
	}
	public void setRegionCode(String regionCode) {
		this.regionCode = regionCode;
	}
	public String getRegionName() {
		return regionName;
	}
	public void setRegionName(String regionName) {
		this.regionName = regionName;
	}
	public String getRegionFullID() {
		return regionFullID;
	}
	public void setRegionFullID(String regionFullID) {
		this.regionFullID = regionFullID;
	}
	public String getRegionFullName() {
		return regionFullName;
	}
	public void setRegionFullName(String regionFullName) {
		this.regionFullName = regionFullName;
	}
	public String getRegionFullCode() {
		return regionFullCode;
	}
	public void setRegionFullCode(String regionFullCode) {
		this.regionFullCode = regionFullCode;
	}
	public String getNodeType() {
		return nodeType;
	}
	public void setNodeType(String nodeType) {
		this.nodeType = nodeType;
	}
	public String getAreaCode() {
		return areaCode;
	}
	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}
	public String getPostCode() {
		return postCode;
	}
	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}
	public int getNodeLevel() {
		return nodeLevel;
	}
	public void setNodeLevel(int nodeLevel) {
		this.nodeLevel = nodeLevel;
	}
	public String getNodeKind() {
		return nodeKind;
	}
	public void setNodeKind(String nodeKind) {
		this.nodeKind = nodeKind;
	}
	public String getSortNo() {
		return sortNo;
	}
	public void setSortNo(String sortNo) {
		this.sortNo = sortNo;
	}
	public String getfParent() {
		return fParent;
	}
	public void setfParent(String fParent) {
		this.fParent = fParent;
	}
	public String getcUsercode() {
		return cUsercode;
	}
	public void setcUsercode(String cUsercode) {
		this.cUsercode = cUsercode;
	}
	public String getcUsername() {
		return cUsername;
	}
	public void setcUsername(String cUsername) {
		this.cUsername = cUsername;
	}
	public Timestamp getcDatetime() {
		return cDatetime;
	}
	public void setcDatetime(Timestamp cDatetime) {
		this.cDatetime = cDatetime;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}

	
}
